/**
 * Copyright © 2016-2025 The Thingsboard Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import 'constants';

:host {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  height: 100%;

  .wrap {
    flex-wrap: wrap;
  }

  .topic-mat-form-field {
    margin-right: 0 !important;
  }

  .tb-messages-container {
    min-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px 0 12px;
    margin-bottom: 8px;
    height: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .limit-height {
    max-height: 260px;
  }

  .tb-message-input-container {
    background: #fff;
    position: relative;

    tb-ws-json-object-edit {
      width: 100%;
    }
  }

  .retain-container {
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 8px 16px 8px 16px;
    border-radius: 4px;
  }

  .margin-bottom {
    margin-bottom: 22px;
  }

  .btn-properties {
    min-width: 100px;
  }

  ::ng-deep {
    .mat-mdc-slide-toggle.mat-mdc-slide-toggle-checked:not(.mat-disabled) {
      .mdc-switch__shadow {
        background-color: $tb-primary-color;
      }
      .mdc-switch__track::after {
        background-color: $tb-primary-color !important;
      }
    }

    .send-message-btn {
      position: absolute;
      bottom: 16px;
      right: 16px;
      z-index: 1;
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 4px;
    }
  }
}
